package me.ree.zkproduct.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import me.ree.zkproduct.enums.DbStatusEnum;
import me.ree.zkproduct.handler.GenericEnumTypeHandler;

import java.io.Serializable;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author ree
 * @since 2024-05-17
 */
@ApiModel(value = "Product对象", description = "商品表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("应用状态：normal:正常，deleted:无效")
    @TableField(typeHandler = GenericEnumTypeHandler.class)
    private DbStatusEnum status;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品代码")
    private String productCode;

    @ApiModelProperty("库存")
    private Long stock;

    @ApiModelProperty("版本")
    private Integer version;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建时间")
    private Long gmtCreate;

    @ApiModelProperty("修改时间")
    private Long gmtModified;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public DbStatusEnum getStatus() {
        return status;
    }

    public void setStatus(DbStatusEnum status) {
        this.status = status;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public Long getStock() {
        return stock;
    }

    public void setStock(Long stock) {
        this.stock = stock;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Long gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Long getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Long gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "Product{" +
            "id = " + id +
            ", status = " + status +
            ", productName = " + productName +
            ", productCode = " + productCode +
            ", stock = " + stock +
            ", version = " + version +
            ", remark = " + remark +
            ", gmtCreate = " + gmtCreate +
            ", gmtModified = " + gmtModified +
        "}";
    }
}
